package com.handu.luna.core.domain.promotion;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by wangzailiang on 2014/6/27.
 */
public interface PostCardPromotionRepository extends PromotionRepository<PostCardPromotion>{

    @Modifying
    @Query("update PostCardPromotion c set c.grantNum = ?1 where c.id = ?2")
    public void updateGrantNum(Long grantNum,Long postCardPromotionId);

    @Modifying
    @Query("update PostCardPromotion c set c.usedNum = ?1 where c.id = ?2")
    public void updateUsedNum(Long usedNum,Long postCardPromotionId);



}
